package com.mxpio.erp.common.quality.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mxpio.erp.common.inventory.entity.Warehouse;
import com.mxpioframework.jpa.annotation.Generator;
import com.mxpioframework.security.annotation.Dict;
import com.mxpioframework.security.entity.BaseEntity;
import com.mxpioframework.security.entity.User;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Author : wpp
 * @Datetime : 2023/6/6 14:32
 * @Desc :
 * @Modor :  Modifytime:
 * @modDesc : 不良品处理单 明细
 */
@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "MB_ERP_QUALITY_UD_AUDIT")
@Schema(description="不良品处理单明细")
public class UnqualifiedDisposalAudit extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @Id
    @Column(name = "ID_", updatable = false)
    @Generator
    @Schema(description = "流水号")
    private String id;

    @Column(name = "BIZ_NO_", updatable = false)
    @Schema(description = "处理单单号")
    private String bizNo;

    @Column(name = "AUDIT_OPINION_")
    @Schema(description = "审核意见")
    @Dict(dicCode = "ERP_QUAL_AUDIT_OPINION")
    private String auditOpinion;

    @Column(name = "AUDIT_OPINION_DESC_")
    @Schema(description = "技术意见说明")
    private String auditOpinionDesc;

    @Column(name = "AUDIT_REVIEWER_")
    @Schema(description = "技术审核人")
    @Dict(dicCode = "username", dicEntity = User.class, dicText = "nickname")
    private String auditReviewer;

    @Column(name = "AUDIT_REVIEW_TIME_")
    @Schema(description = "审核时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date auditReviewTime;
}
